package listeners;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import database.Database;

@WebListener()
public class ApplicationListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        Database.connect();
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        Database.disconnect();
        
    }
}
